home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1989 Janurary / 64er_Magazin_89-01_1989_Markt__Technik_de_Side_C.d64 / text hc (.txt) < prev   
Commodore BASIC  |  2022-10-26  |  1KB  |  41 lines

  1. 100 rem texthardcopy
  2. 110 zs=peek(53272) : rem zeichensatz ermitteln
  3. 120 b=1024 : rem startadresse des bildschirms
  4. 130 d$="c" : rem druckertyp
  5. 140 :        rem "c" = commodore
  6. 150 :        rem "a" = ascii
  7. 160 if zs=21 then open 1,4,0 : rem gross/grafik
  8. 170 if zs=23 then open 1,4,7 : rem klein/gross
  9. 180 if zs <> 21 and zs <> 23 then end : rem kein normaler zeichensatz
  10. 190 :
  11. 200 print#1,chr$(27);"@" : rem drucker initialisieren
  12. 210 print#1,chr$(27);chr$(108);chr$(10); : rem 10 spalten linker rand
  13. 220 :
  14. 230 for z=0 to 24
  15. 240 : for s=0 to 39
  16. 250 :
  17. 260 :   m=b+z*40+s
  18. 270 :   x = peek(m)
  19. 280 :   if x>127 then x=x-128 : rem reverses zeichen -> normales zeichen
  20. 290 :   if x>=32 and x<=63 then450: rem sonderzeichen
  21. 300 :   if d$="a" then350: rem drucker-pruefung
  22. 310 :   rem commodore
  23. 320 :    if x>=64 and x<=95 then x=x+32 : goto450
  24. 330 :    x=x+64
  25. 340 :    goto450
  26. 350 :   rem ascii
  27. 360 :    if zs = 21 then420: rem zs-pruefung
  28. 370 :     rem zs klein/gross
  29. 380 :      if x<=31 then x=x+96 : goto450
  30. 390 :      if x>=96 then x=32 : goto450: rem nicht druckbares zeichen
  31. 400 :      goto450
  32. 410 :     rem zs gross/grafik
  33. 420 :      if x<=31 then x=x+64 : goto450
  34. 430 :      x=32 : rem nicht druckbares zeichen
  35. 440 :
  36. 450 :   print#1,chr$(x);
  37. 460 : next s
  38. 470 : print#1,chr$(13);
  39. 480 next z
  40. 490 close 1
  41.